import request from "@/utils/request";

// 查询服饰列表
export function listClothes(query) {
  return request({
    url: "/gsClothes/list",
    method: "get",
    params: query,
  });
}

// 分页查询列表
export function listClothesByPage(query) {
  return request({
    url: "/gsClothes/list",
    method: "get",
    params: query,
  });
}

// 查询服饰
/* export function getClothesById(query) {
  return request({
    url: "/gsClothes",
    method: "get",
    params: query,
  });
} */
// 查询同款不同码服饰
export function getClothesByclId(clId) {
  return request({
    url: "/gsClothes/" + clId,
    method: "get",
  });
}
// 查询同款不同码服饰
export function getClothesByclCategory(query) {
  return request({
    url: "/gsClothes/listByCate",
    method: "get",
    params: query,
  });
}

// 新增服饰
export function addClothes(data) {
  return request({
    url: "/gsClothes",
    method: "post",
    data: data,
  });
}

// 修改服饰
export function updateClothes(data) {
  return request({
    url: "/gsClothes",
    method: "put",
    data: data,
  });
}

// 删除服饰
export function deleteClothes(clId) {
  return request({
    url: "/gsClothes/delete/" + clId,
    method: "delete",
  });
}
